{extend name="common/form" /}
{block name="form" /}
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
    <div class="widget am-cf">
        <div class="widget-head am-cf">

            <div class="widget-title am-fl">添加子分类</div>
            <div class="widget-function am-fr">
                <a href="javascript:;" class="am-icon-cog"></a>
            </div>
        </div>
        <div class="widget-body am-fr">
            <form class="am-form tpl-form-line-form">
                <input type="hidden" name="id" value="{$info.id|default=''}">


                <div class="am-form-group">
                    <label for="user-name" class="am-u-sm-3 am-form-label">
                        回收分类
                    </label>
                    <div class="am-u-sm-9">
                        <select name="type_id" data-am-selected="{searchBox: 2}">
                            {foreach $type_list as $v}
                            <option value="{$v.id}"  {present name='$info.type_id' } {eq name="$info.type_id"  value="$v.id"}selected{/eq}{else /} {eq name="$type_id"  value="$v.id"}selected{/eq}{/present}>{$v.title}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-name" class="am-u-sm-3 am-form-label">
                        子类名 </label>
                    <div class="am-u-sm-9">
                        <input type="text" name="name" value="{$info.name|default=''}" required="required"
                               class="tpl-form-input" placeholder="请填写子类名！">
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-name" class="am-u-sm-3 am-form-label">
                        描述 </label>
                    <div class="am-u-sm-9">
                        <input type="text" name="describe" value="{$info.describe|default=''}" required="required"
                               class="tpl-form-input" placeholder="请填写描述">
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-name" class="am-u-sm-3 am-form-label">
                        参考价格
                    </label>
                    <div class="am-u-sm-9">
                        <input type="text" name="reference_price" value="{$info.reference_price|default=''}" required="required"
                               class="tpl-form-input" placeholder="请填写参考价格">
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-name" class="am-u-sm-3 am-form-label">
                        单位
                    </label>
                    <div class="am-u-sm-9">
                        <input type="text" name="unit" value="{$info.unit|default=''}" required="required"
                               class="tpl-form-input" placeholder="请填写单位">
                    </div>
                </div>

                <div class="am-form-group">
                    <div class="am-u-sm-9 am-u-sm-push-3">
                        <button type="button" onclick="add('{:url("")}','form')" class="am-btn am-btn-primary tpl-btn-bg-color-success">
                        提交
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{extend}
